home *** CD-ROM | disk | FTP | other *** search
-
-
-
- sssseeeemmmm____iiiinnnniiiitttt((((3333CCCC)))) sssseeeemmmm____iiiinnnniiiitttt((((3333CCCC))))
-
-
-
- NNNNAAAAMMMMEEEE
- _ssss_eeee_mmmm______iiii_nnnn_iiii_tttt - initialize a posix unnamed semaphore
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_eeee_mmmm_aaaa_pppp_hhhh_oooo_rrrr_eeee_...._hhhh_>>>>
- _iiii_nnnn_tttt _ssss_eeee_mmmm______iiii_nnnn_iiii_tttt_((((_ssss_eeee_mmmm______tttt _****_s_e_m_,,,, _iiii_nnnn_tttt _p_s_h_a_r_e_d_,,,, _uuuu_nnnn_ssss_iiii_gggg_nnnn_eeee_dddd _iiii_nnnn_tttt _v_a_l_u_e_))))_;;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _ssss_eeee_mmmm______iiii_nnnn_iiii_tttt initializes the unnamed semaphore located at address _s_e_m. The
- address _s_e_m may reside anywhere in the calling processes address space,
- but if the semaphore is intended to be shared across process boundaries,
- _s_e_m must reside in shared memory.
-
- The _p_s_h_a_r_e_d argument is used to specify whether the semaphore is intended
- to be shared across process boundaries or only used locally by threads of
- execution within a common process. If _p_s_h_a_r_e_d is set to zero, then the
- semaphore _iiii_ssss _nnnn_oooo_tttt intended for sharing across process boundaries.
- Conversely, a non-zero _p_s_h_a_r_e_d value indicates any process having read
- and write access to address _s_e_m, may perform semaphore operations on _s_e_m.
- Unnamed semaphores have been optimized for local thread usage, delivering
- increased performance within posix thread applications [see
- _pppp_tttt_hhhh_rrrr_eeee_aaaa_dddd______cccc_rrrr_eeee_aaaa_tttt_eeee(3P)].
-
- The initial value of the semaphore is specified by _v_a_l_u_e, which may be
- any non-negative number less than {SEM_VALUE_MAX} [see _ssss_yyyy_ssss_cccc_oooo_nnnn_ffff(3C)].
-
- POSIX semaphores are compatible across all MIPS ABIs: o32, n32 and 64.
-
- Once a semaphore is initialized, processes may execute the following
- semaphore operations: _ssss_eeee_mmmm______pppp_oooo_ssss_tttt, _ssss_eeee_mmmm______wwww_aaaa_iiii_tttt, _ssss_eeee_mmmm______tttt_rrrr_yyyy_wwww_aaaa_iiii_tttt, _ssss_eeee_mmmm______gggg_eeee_tttt_vvvv_aaaa_llll_uuuu_eeee,
- _ssss_eeee_mmmm______dddd_eeee_ssss_tttt_rrrr_oooo_yyyy.
-
- _ssss_eeee_mmmm______iiii_nnnn_iiii_tttt will fail if one or more of the following are true:
-
- [EINVAL] The _v_a_l_u_e parameter was set to a number greater than
- {SEM_VALUE_MAX}.
-
- [ENOSPC] The resources required to initialize the semaphore have been
- depleted.
-
- [EPERM] The calling process lacks the permissions required to
- initialize the semaphore.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- sem_destroy(3C), sem_getvalue(3C), sem_post(3C), sem_wait(3C),
- sem_trywait(3C), sem_open(3C), sem_close(3C), sem_unlink(3C),
- shm_open(3C), sysconf(3C), mmap(3C)
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- sssseeeemmmm____iiiinnnniiiitttt((((3333CCCC)))) sssseeeemmmm____iiiinnnniiiitttt((((3333CCCC))))
-
-
-
- DIAGNOSTICS
- Upon successful completion, a value of 0 is returned to the calling
- process. Otherwise, a value of -1 is returned and _eeee_rrrr_rrrr_nnnn_oooo is set to
- indicate the error.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-